#pragma once
#include<iostream>
#include<vector>
#include<deque>
using namespace std;

namespace ganyu
{
	template<class T, class Contianer = deque<T>>
	class Stack
	{
	public:
		bool empty()
		{
			return _con.empty();
		}

		void pop()
		{
			_con.pop_back();
		}

		T& top()
		{
			typename Contianer::reverse_iterator it = _con.rbegin();
			return *it;
		}

		const T& top() const
		{
			auto it = _con.rbegin();
			return *it;
		}

		void push(const T& val)
		{
			_con.push_back(val);
		}

		size_t size() const
		{
			return _con.size();
		}

	private:
		Contianer _con;
	};
}
